Chevy HHR '07 LS Manual having trouble starting

Every once in a while, when I put the key in the ignition, I cant turn it until i either wiggle the shifter, turn the steering wheel, or step on the brakes a few times. Sometimes it starts just fine. Being on hills, or temperature variation doesn’t matter with this, and sometimes its easier to fix than other times. Does anyone know what may be causing this?