Py3 types Fix and apply() fix