fix coding mistakes