fixing reponse code which should be a number, not a string