fix issue with RunFile and global environment