Addition fix for #1255

Data should be serialized to check length