Reverted back to a better working function.
Merge branch 'origin/gh-pages'