final fixes, now it works also on VS2012