Made InPlace optional for the batch mode.