fixed pitch count bug