fixing preview and view published buttons states on unit page