Some fixes when vars are not defined

Gave errors with strict vars on