more fix and speed up