Fix close()

Cannot assign to read only property 'length'