Added case where start and end square are the same