make code more safe (RT#79458)