check type of u.permissions, just to be sure