off by one error in feedback counter