Fix for issue #406