fix bugs after changes