various fixes and niceties