Fixed comparison and sign of fermion_state.