fixed VC++ optimizer bug