Fixed high CPU usage bug.