fixed issues to work with vs2013