Fix several bugs of mvreg. Add more complete comment