Fixed containment issues (thanks to rdavies)