fixed compile errors in create_messages()