Fix issue #305.