fix bugs, turning profermance.