Look since highschool I've learned to work in team. There's always someone who tries to take credit for all the work you've done but the way to manage it is to take it easy, at the end just because it's not his idea, his work and stuff he has just a clue of how things work but don't know really everything about it so take it easy. When something happens like that I would have gone with the boss and told him what happened, not to put an excuse but to make him to notice the problem. In small companies you have to do everything you can, one time I was hired as a web designer and developer but ended up doing some video edition and audio recording and composing so don't feel bad about it and take it on the bright side... learning new stuff. And for the record that kind of persons that try to take advantage of others and steals everything eventually will be fired or be known for doing that when they take the leadership or have to develop something they don't know how to do it. Anyway good luck finding a better job.