fix overflow on 32bit arch, new unsafe method to access pool