Fixed flipped M and N key.
Fixed VC++ warnings.