Were you very close to other swimmers? You may have inadvertently been trying to swim at someone elses pace or stroke rate. I often find that I can't get my rhythm in a race and usually find it is because I am spending too much time concentrating on someone elses swiming and not mine. I really have to switch off from everyone else to swim comfortably in a race.