fix CPU usage bug