Fixed problem with button pressed event.