Removed a few minor bugs.