fix for dynamicallly-added pages