fix coffee to js convertion slice method