Added disabled function, bug fix

Bug fixes for sort options.