Some bug fixes

Signed-off-by: Martin Kvasnicka <Martin.KVASNICKA@firstdata.sk>