fixed critical bug with error in response