Fixed #1531

Fix for #1531