buttons for automatic quit