Propagate options for casting data, fix an error in enum handling, return string keys for enums from middleware