minor code corrections