Fixed bug where edge hanging would crash the game