Bug fix; need to include global
More tests, while trying to work out bug