fixed problems when starting with batch number != 0
fixed error when reading different distributions