fix RMAP read & write