Fix bug where entities sometimes don't move