fix to set provider locale properly after a redirect