fixed click handler for canvas