Undefined isAdmin fix