Mixed some minor bugs