Fixed bug where x and y clicks were not relative to canvas