Fix getting http code