issue #5 - bug fixes