fix the isnan check for agent bearing