fixed error when trying to make calls before loaded