Fix for counting