Fix a bug in falling code where entities get stuck