fix anon JS function call