Fixed another bug in buildMessage