Your employer is paying for your labor, nothing more. If it doesn't impact safety, workplace rights or efficient collaboration, it's none of his business. He doesn't own your time, your sensory experience, or your right to happiness.
Make that clear and if nothing changes move on.
> I got yelled at couple of times because there were some bugs.
This is entirely the wrong way to deal with bugs. Bugs are not the product of bad programmers; bugs are symptoms of bad processes. Bugs happen. The response to them should be preventative, not punitive, i.e., how did this happen, how can we detect it in the future, is it worth not just detecting but preventing in the future, and if so, how do we do that systematically. Of course there will be bad programmers, but environments like this give them the scaffolding to improve, and if they don't there's much more basis for letting them go than just, "you made a bug."