fixed that horrible access violation bug on the x64 platform!!