Adding checks to prevent duplicate route additions