Fix some edge cases

cc @sh1mmer @Matt-Esch
god knows what's different about it :/