patch some bug.