Fixes to repair tests