Corrected issue with incorrectly handling tern responses