Bug #3907, other fixes