Fixed 500 error on invalid order_by parameter; closes #755