Fixed issue #309