fix errors scope