fix issue #12
fix issue #13
fix issue #14
fix issue #15
fix issue #16