Modification about autoPair()