Some bug fixed

Signed-off-by: Laex <laex@bk.ru>