Fixes #297.