Fixed bug in crossing
Major changes and fixes.