fix issue #7
fix issue #6