Fixed issue #3. Allow multiple training batches