Fixed small mistakes in code.