various fixes/enhancements