mark 5: more bugfixes