Fixes for ordering and filtering