General bugs correction

Signed-off-by: Piotr Carewicz <piotr.carewicz@gmail.com>