issue #5 - bugfixes