attempting to fix slowness bug