Fixed some bug and have some minor change