Fixed finding the limit for movement
IDK what this is