Fixed click event for PhantomJS