fixes nasty calucaltion bug in batch decorator