fix and some clean up