Regularity of the spectrum for the almost Mathieu operator