DC Motor and Servomotor synergy.

I am just getting into this electronics stuff and im experimenting with the beginners kit. But I am having problems when using an H-Bridge to control my DC motor. I also have a servo hooked up, and both are controlled by potentiometres. I have two momentary switches to control the motors on/off state and the direction, and one to switch the servo from being angle adjusted by the potentiometer, to being oscillation speed adjusted by the potentiometer. However, when the motor is 'on', the servo just goes haywire, and the motor does not respond to speed control. it simply is off when the knob is low, and on when it is maxed. I'm certain it is a problem with the <Servo.h> library, and the fact that i am using an H-bridge, when i comment out all <Servo.h> related functions and test only the motor, it operates just fine. I am confused because the servo isn't even connected to the motor circuit or the H-bridge. I have built a similar circuit, without direction control, using a mosfet transistor. And in that way i had no problems (except an annoying issue with my LCD disply showing me random characters during motor operation). Am i possibly creating interference in the circuitry with the motor?

I solved the issue. <Servo.h> utilizes pins 9 and 10 primariliy. so when a servo is attached using Servo::attach() those pins become intrinsically linked to the Servo class and should not be used for other pulse width modulated components.

Suggest reading the comments in Servo.h - its always worth checking a libraries capabilities
notes and caveats this way.