Fix slice error in chrome