fixed demo script bug for empty gh-pages