fixed crash

Signed-off-by: Konctantin <gawrilyako@gmail.com>