typeError fix