[MH,RG] fix some bugs in the maintest and fix the problem with the sound