fix for proper JSON response when using the json middleware in express.