Fixed the square being stuck on the left and right borders.
Updated the stuck check to do it.