A few minor correctness changes