Prevent error when removing all fence/resources in GUI