Added check on widgets and pages