fixed replace_np