Fix aglsetup always succeeded regardless of whether errors or not