fixed bug in image model