Fixed Problem with undefined vars.