msglen and msgflat work