fix minor bugs after merge