fix a bug related to read permission