Fix for issue #584

See issue #584 for information