Moved some things back a bit for VS2012 compiler.