Fixes based on porting router from v1 to v2