filter by container when necessary, fixes #58