Fixed issue #335