Update global.lua and small fix and optimization on Ruprecht
Another small fix on Ruprecht