cleaning up some bugs