bugfixes resulting from merge