Fixes some bugs

Signed-off-by: Irina Chichikova <diva.artim@gmail.com>