Fix EntityNotFoundException when removing active rules