Fix image model's unserialization and __init__