[#805] Added 'var' to avoid global being defined