fixed faulty eventlisteners