fixing message comparison