Fix bug in gen body messages