You clearly don't know anything. It is called dangling construction and DOES need correcting. The correct way to avoid misinterpretation is: While I was reaching the station, the sun came out.
That's how it's teached guys, we haven't invented it.
Greetings.