fixes scaling of pictures onto canvas