Fixed right typo (was rigth), and simplified one conditional.

I can't run the tests fully. Many things fail. I'll open a ticket for that so you can see the output I get.