Minor fixes to merge in Random to master