merged upstream version from 2014-6-30