fix the coordinates in canvas