Fix issue #297