Fix image marshal