fixed code analysis issues, testing VS2013