add perfomance tweak thanks faux123 from biagio7xD