Fixes to patch depth