bug fixes; related to issue #8