fixed bugs

Signed-off-by: Dmitry Konurov <dmitry.konurov@opensoftdev.ru>