Fix a pair of undefined function references

Looked like typos.
Altough I've added a test just to reassure myself I've done the right thing.