fixing a bug whe container is not element