Fix bin packing bug