Merge "Fix NoneType error when creating router"