fixing error bug