fix up bugs

fix up bugs