small bug corrected when switching chains