1.4 stable

This is a backport of fix from develop to current stable branch.