Bugfix. Two undefined vars (now an issue because of strict mode)