Some stylecop fixes
bug fixes