bug fix for fetchaccesstoken