Fix indentation issues in create_msg function