fixed a bug that crashed the game when a spark went off-screen