fix mix of static and dynamic pages