fix bug in authorize\!