fix some minor coding errors