Fixed a typo in formatResponse