Fixed NullPointer on batch finish.