unauthorised detection bug fix