Fixes to correct stack overflow in authenticator