revert 6c5402c e26f003 2a1229d cbb2e15 88bda6c , see #864