Fixed mistakes in code.