possibly fixed a common TypeError