Fixed a bug in slave when launching container.

Review: https://reviews.apache.org/r/24440