fix to allow global vars