Fixed compile error in typescript