Fixed a weird error message in Chrome. Seems it doesn't like the slice function ... sometimes.