fix coding errors