fixing canvas image sizing issues