Fix for issue #1226