fixed minor bugs with the test