global scope bugfix