Fix warning name not defined error