also fixed issue #315