Some quick bugfixes

Signed-off-by: dradancer <kuba.zarybnicky@post.cz>