small code corrections