fix funky closure