typeerror fix