fix serialization images bug