some performance corrections