fixes a batch shape remove bug