fix tests, add another test for patching