Fix Regression in Serializing images