issue #32 bug fixes