remove a few bugs