Fix users quitting and improve code consistency