Practice, practice, more practice. Use a metronome and start very slowly, move up a few bpm at a time. Make sure that each note is perfect, don't let the middle notes become a blur. Record yourself and check back every few hours of practice to make sure you're not making mistakes.