issue #2284: fix bugs after merging master