Fixed function returning function weirdness