BUG: functiontoapply character test