fixed regexp serialization bug