Fix return http code errors