Fixed last category resetting