fixed x64 error when adding edges