Fix bug in makeRequest method