Fixed issues reported in 4909 and 4914