Issue #797 fixed. Global variables need again to be tested :(