Compare the GUID in these if statements instead of the index.