fixing one of the bugs