fix elim bugs