issue #1 bug fixes