Fix device counter