some fixes, clean up