fix all the bugs