some basic cleanup bugs