Fixes redirect issue