added patch_source where it made sense