fixed mousePressed() issue