fixed bug where warning was not defined.