fixing preview mode to be independent of url get parameter