Revert part of last commit and handle containers properly.