fix to some of the testing logic