added check that process is not null when attempting to hide it