Fixed some less minor bugs