fix error in making response