fixing issues with redirects and validation