Fixed the containsData function