It is true the dog thought you were a prey animal though. Definitely stop, get bike between you, and act authoritative if it ever happens again.
I've been told this is less likely to work for a small number of breeds, pit-bulls and pit-bull mixes in particular. Is there anything to this, does anyone know?