At some point in your career, you may find yourself working in an environment that’s less than ideal. Maybe your company is undergoing struggles or you have a manager or co-workers who simply don’t support you or others at the office. If that’s the case, it can be demoralizing and difficult to put your best foot forward and succeed in the workplace.

“Quitting immediately isn’t always an option so they have to find a way to stick it out. If this is you, and you are trying to make it last (at least for right now), then it is time you start being proactive about your work environment,” according to Huffpost in an article discussing how to survive and thrive in a toxic work environment.

To help, here are tips you can use to thrive in a difficult workplace (that don’t involve quitting and finding another job):

First, it’s important that you have someone outside of the workplace who you can turn to for support. “Having a support system is so key, especially if you want to follow tip #1. This way you can vent and release your pent up frustration without bringing it home with you,” according to Huffpost. “Ask a friend who you trust if they would be willing to let you vent to them once in awhile. You can even let them know you don’t need a response, but just a safe space to release pent up frustration.”

Second, you should do your best to maintain a positive mental attitude even if it can be difficult to maintain at times. “Perhaps there are professional development opportunities that could help train you for a future position. Take advantage of those and think about how this job is just a stepping stone to something more. Find any positive ways to make your job a positive and only focus on that,” according to the news publication.

Another piece of advice? You should create boundaries between the toxic work environment and your personal life in order to protect your mental well-being, while also being able to focus on the tasks at hand. “This one is a real challenge for most people. Learning to say no can be really difficult,” as noted by HuffPost.

So, what are examples of successful boundaries? It can be mean everything from simply taking your lunch break to ensuring that you don’t take any work with you after the day ends. “Boundaries are not only healthy for you, but also for the people you work with. You can set an example for others and show them that it is okay to take care of yourself and let your job come second,” according to the publication.

In sum, a challenging work environment can make it difficult to succeed for a variety of reasons. By having people you can speak with, maintaining a positive attitude and creating boundaries, you’ll be able to thrive no matter what.