fix up some problems