bug fix in Image layer