fixes, speedup