fixed ts error