getButtons now wait for updateUi finish to populate database