some correctness changes