fixed bugs/tests