add quit support

Change-Id: I9128129ac5aa4d6ddff5dd94fbec4632d86b5ff0