Update quit functionality