clean up some notices and warnings