issue #22 bugfix