Minor patch to reduce cpu load.