bug fix on tests