Fix release runtime segmentation fault

see the change in common.c

also removed some of the older visual studio stuff as it was confusing