Fixes some bugs

Fixes #2, #3

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