Fix error with total registers counter