remove debug stmt and undefined variable reference