Fixed pointer events bug