Fixes #584