fixed handling multi permissions