Merging bugfixes from 1.5.0 release branch.