fix bugs + rm some garbage