Fixed few errors in the code.