Permalinks display data with the same titles. Changed the way data is passed to gallery and permalink templates.