sync @ 207, use bit operators in gui's core.lua