Fix scope problem