fixed bug of scaling image.