Fixed typescript typing error