fix on TypeError