Fix some edge cases

cc @sh1mmer @Matt-Esch
Oh hai, Isaac.