add hasMessages() into flashMessenger