         unsigned int tpp = min(args.tpp,block_size);
         unsigned int n_groups = block_size / tpp;
         unsigned int max_queue_size = n_groups*tpp;
-        unsigned int max_depletant_queue_size = n_groups;
+        unsigned int max_depletant_queue_size = max_queue_size;
 
         const unsigned int min_shared_bytes = args.num_types * sizeof(typename Shape::param_type) +
                    args.overlap_idx.getNumElements() * sizeof(unsigned int);
 
-        unsigned int shared_bytes = n_groups *(sizeof(Scalar4) + sizeof(Scalar3)) +
-                                    max_queue_size*2*sizeof(unsigned int) +
+        unsigned int shared_bytes = max_queue_size*2*sizeof(unsigned int) +
                                     max_depletant_queue_size*sizeof(unsigned int) +
                                     min_shared_bytes;
 

            tpp = min(tpp, block_size);
            n_groups = block_size / tpp;
            max_queue_size = n_groups*tpp;
            max_depletant_queue_size = n_groups;

            shared_bytes = n_groups * (sizeof(Scalar4) + sizeof(Scalar3)) +
                           max_queue_size*2*sizeof(unsigned int) +
                           max_depletant_queue_size*sizeof(unsigned int) +
                           min_shared_bytes;
            }

                Scalar4 orientation_j;
                vec3<Scalar> r_jk;

                // regenerate depletant using seed from queue
                hoomd::RandomGenerator rng(hoomd::RNGIdentifier::HPMCDepletants, seed+i, check_didx, select*num_types + depletant_type, timestep);
                vec3<Scalar> pos_test = vec3<Scalar>(generatePositionInOBB(rng, obb_i, dim));
                Shape shape_test(quat<Scalar>(), s_params[depletant_type]);
                if (shape_test.hasOrientation())
                    {
                    shape_test.orientation = generateRandomOrientation(rng,dim);
                    }

                // build shape j from global memory
                postype_j = check_old ? d_postype[check_j] : d_trial_postype[check_j];
