backport fix from 1.4.1