bug fix during unit test