Fix unsaving changes exit and inconsistencies.