fixed issue with infinite loop due to eventListener changed to persist throughout entire game