fixed viewer.js pagename treatment