Update which

Fixes a tiny memory leak