First fix ineffective in some cases. Issue #540