Fixes redirect problem