Fix for issue #316.