Fix some bugs.

The most importance part in this bug fixing is we set the value of rtp is zero if the value of sstot is zero.