This is wrong for batch-initializations. Even for a single initialization it seems hackish.