fixing directive for non-static pages