Adapted header and corrected message copying.