fix router issue and improved parser