Fixed memory leaks

Updated to only rescan for identities if a slot reset has been detected