fix readonly bug, need check again