events check was wrong, not on this on window