Fixed issue #305