fixes authorise bug