Fixed small bug when switching between terms