bug fix for user quit