Minor code corrections