fixed issue #316
fix issue #316