Fixed some more minor bugs