fixed the freezing in midair problem