Fixed termination bug in Reducer