Fixed error in creating message