Fixed logic to prevent player being stuck in platform