more speedup fixes