fixed potential crash in Win8 :(
formatting cosmetics