Fixes issue where function wasn't referenced correctly