added counter
Fixed counter