fix the bug about readonly