Fixing a bug in ResourcePointer