resolve some obvious 32/64bit issues