various fixes