Fixed issue #306