Actually if you look at line 134 above you will see why it will work. What is now line 134 used to be (in red) line 140 below. I moved it up for exactly the reason you describe. I felt it was cleaner to use 'api' everywhere.