various fixes :(