fixed mouse click bug (using mousePressed instead of mouseClicked, this
method is called when mouseButton is pressed independent of whether it
is released on the same pixel or not)