Fixed few minor bugs.