Fix small bug in click handlers