drawImage bug fix