Added 'var' to avoid global.