Couple of Fixes for Astar Search in Lua

Hi,

I brought a couple of fixes for the previous A_Star Search Lua implementation.
Hopefully, everything works now as expected ;)
Sorry for the noise.

Regards,
Roland.