Commit some fixes from stable/10 into master