Changed set intersection so that I dont get array out f bounds.