Fixed issues with router integration