img funct fix