Fixed a bug: data not correctly set after having set resource content