add safeguard