Fix image input errors