Fix bugs of encounters