fixes in several places