Changed from mouseClicked to mouseReleased