undefined var cleanup