Fixed bugs and typos

Signed-off-by: Tabor Kvasnicka <kamakwazee@gmail.com>