guard against crash