fix to assign images correctly