fixed a bug with unserialize