Solved some minor bugs.