amd fixes in lua