Squash warning

Raising a PR for discussion. This squashes the warning, but the relevant function still seems a bit confused to me.