Fixed scope issue