I second the suggestion from maggior to use a drum machine or metronome when you practice. Your rhythm will get much better. This problem is actually quite common, and you can fix it just by adding this one habit of using a metronome or drum machine.