Connection bug fix using permissions