replace_block fix