Trying to fix scope issue