change the conditional as per the comment
Merge pull request #49 from hysysk/randomToMousePressed

change the conditional as per the comment