Fix image handling