fixed NaN bug, modified new_game and key events to prevent another NaN