correcting the bugs