Fixes to replace