fix issue #304