Fix scope errors in base.character