bug fix of issue #5