Fixed error marks not being erased when changing scope