More little bugs and edge cases