1. Add check of configuration of corner in the end of spine. 2. Correct treatment of "smooth corners".