bug fixes for test