Fix several issues of the public_rlms implementation