getting rid of some bugs