fixed bug on eventlistener. Events buffer was storing every key pressed.