Fixed failing test with global function