bug fixes #3