fixes token refresh not working before the second time