Fix slowness bug