fixed bug in moving sideways in end row