fix pointer encoding bug
impl deep mode on Resource.all