fix for replace