fixed freezing/slow down issue