Midi to Audio Recording Not in Sync

Thank you for your feedback.

I did a midi drum track. I recorded it to an audio track so I could export. The midi track and the audio track are out of sync. There is a momentary delay. How can I get the beat of the audio track in sync with the original midi track?

Fred