Fix some other bugs