Fixed a bug which may affect the drawing of image layers