Remove duplicated message hide code.