Fixed issue with router being referenced before it was being created.