change RLOCK,RPID to SLOCK,SPID as @misilot recommend