Fix user permission bug