Fix warning. This closes ticket:3861 and ticket:3860.