Add another condition to prevent serialize from running before deserialzie