fix issue #316