Fixed invalid geometry issue on 32bit OS