Fix logic problem considering the use of accessToken