fixed error when there are no routes defined