Fix bugs

Signed-off-by: Yaroslav <yaroslav@itwonline.ru>