Made removing of remote entities work.