bug fix during unit testing