fixed node cast exception in case more than one spreference page is used