ref protection