Bug fix in user serialization