Partically fix performance of getRestrictions