Better handling of flags and ignore blank messages