Fixed a few issues related to token requests