Fix function loading

* The g function wouldn't work the first time. Not sure why but I like
that deleting code fixed it.