ui: avoid casting warnings on findbugs

Change-Id: I07e7ec1e01dd6069f75e08202d11a0c87cac2d58
Signed-off-by: Yaniv Bronhaim <ybronhei@redhat.com>