Bugfix in function getResponse