In a recent interview on Dax Shepard’s podcast “Armchair Expert,” Scarlett Johansson talked about how she used to worry that she would only play “hypersexualized” characters early in her career.

“I kind of became objectified and pigeonholed in this way where I felt like I wasn’t getting offers for work for things that I wanted to do,” she said on the podcast (via Yahoo). “I remember thinking to myself, ‘I think people think I’m 40 years old.’ It somehow stopped being something that was desirable and something that I was fighting against.”

“Because I think everybody thought I was older and that I’d been [acting] for a long time, I got kind of pigeonholed into this weird hypersexualized thing,” she continued. “I felt like [my career] was over. It was like: that’s the kind of career you have, these are the roles you’ve played. And I was like,¬†this is it?”

Johnson, now 37, started acting when she was a child. When she was young, she was in movies like “North” and “Home Alone 3.” By the time she was in her late teens, she was getting parts in movies like “Ghost World” and “The Man Who Wasn’t There” by the Coen Brothers.

In her 20s, she played roles where people liked her, like in “Match Point” by Woody Allen and “The Black Dahlia,” a noir. Johansson said that time in her career was “scary” because she thought she would never move on from those roles.

Read more:  Johnny Depp Looks Handsome in Rihanna's Fashion Show As People Boycott Him

All of that changed when she was cast as Natasha Romanoff/Black Widow in the Marvel Cinematic Universe. This made her one of the most popular movie stars in Hollywood.

Johansson said on the podcast that she’s glad that the next generation of young stars won’t have to go through what she did.

“I see younger actors that are in their 20s, it feels like they’re allowed to be all these different things,” she said. “It’s another time, too. We’re not even allowed to really pigeonhole other actors anymore, thankfully, right? People are much more dynamic.”