fix recently introduced problems with bed slicing