fix grid counter