Extract proper md name