Fixed few bugs.