Now that I think about it, this doesn't cover some other cases. I'll fix those as I come across them.