Corrected authorized check on thresolds instead of environments