"Should have been 2-2"

In the refs defense, I heard him blow his whistle before the Riverside player even shot the ball. I know you would say well it should have been advantage-- for that I have no answer. All I know is that the ref did call for a free kick before the goal was even scored.