unify message code in controller

inconsistent change in f296ff1