Made modes persistent to close #5