fixed errors in RouterStart function [NOTE: refactor redundant code later]