Fixed issue #331