Fixing tests after refactoring names of functions
Proper decoding of schema type