Minor fix for mouse click function