Your code is not executed on shard where you don't have any creeps or structures. In order to clear the memory on another shard, you may send a scout to the target shard via portals and maybe wait couple of minutes. This would activate your code on the target shard and you'll be able to clear the memory. As for displaying excess CPU, it should be fixed for you currently.