fix making sure required params are present before redirecting