fixed perfcount script