Fixed some bugs during compilation

Signed-off-by: Koshel Dmitry <dvkoshel@gmail.com>