Some fixes for batching system - still out of bounds error...?