Fix scope issue