fixes #4459 - allows proper rendering of pages using root_path