fix messanges table issue