Fixed several bugs under RLSD.