Fixed type error which hit when loading images to SLM.