merge [3987/branches/1.0], refs #989 and #990