Fixing a deserialization bug

Fixed a bug that would result in some inputs being deserialized incorrectly