Fixed some bug related to multi resource read/write