Fixed bug where refreshing token was calling wrong function name