Batch fixes

Contains fixes for #171 & #172