fixed problem described in issue #7