fixed n_smsg_valid and n_smsg works now