Fixed bug of permission