fix for 32bit (not tested)