Fixes sorting and OptionType errors