fixing bug in msg loading