Merged 5.1.1 from SVN to Github master.