fixing high cpu issue