Trying again to fix the infinite loop issue (testing is hard)