fix the image not drawing issue;