Fixed scoping issue in profile
rebasing