Hmm... this is actually happening to me in general,
when recording using a MIDI cable connected to my
outboard soundcard (on a PC setup).
The MIDI data I record is 13 to 18ms before it was
actually received and played by the softsynth, and
when I was searching for a solution on web I found
out that it was probably an ASIO driver I/O buffer
difference, and it was mostly with people using Cubase.
There were some solutions, but I did not find any that
would resolve my issue.
Try searching for one on Google:
http://www.google.si/search?q=midi+recorded+out+of+sync
Luckly it's not that much off (only an offset), so I
can always adjust it manually after recording, and
sometimes use a sync point to match it better when
better accuracy is needed (does not happen often)