Fix issue #304