Added extra function to quit