make sure the selected parameter also works with pagination or other get parameters