bug fixing on tests