fixed issue #316