Solve some possible bugs on sound and soundbuffer