Fix issue #515