Added function to ensure indicies for addresses exist