fix some other bugs