remove replace_generated check