Move container empty command out of conditional block