Weird outcome. I can't see why cable length should make a difference.

What I'd be more inclined to suspect is that the plugs wern't quite making proper contact in the socket of the router / modem.
Anyhow the important thing is it's working for you now