Fix retrieval of token