cleaning up some bugs.