fix some known bugs