pm: can now correctly read and write settings