Fix to refine_implictMD