fixed major cpu consumption bug