Stopped subprogram from crashing if there are no related resources