cleaning and hotfixes after recent merges