various fixes / improvements