adjusted for #254, #255 and #259

(loosely related to #243)