[BUGFIX] Catch possible error due to wrong redirect regex