fixed some performance