Fixes bug for issue #1451