Fixes scope issue