fix a bug associated with groupping for long FL slab in the script