Most of bug fixed