Correct small errors in code