Fixes undefined.toString error