fix bug in fire_lua_callbacks

Wasn't traversing the loop correctly.