fixed unserialize function compatibility