Fixed incorrect invalid message bug