fix compiling errors in persistenced