Fixes treating function reference