Where does scratch come from? It's undefined