Fixed an integer overflow that caused the token to always be refreshed