core: fix finbugs

Change-Id: Ie256989b403263cef5f97bf049da4df2e838824a
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>