misc stuff and fixes