Fixed fitbit api helper code that accesses API