Merging changes at 2014-04-29 from upstream fork.