Fixing bugs

Change-Id: I376ebdcd95bf64487bc480efd91749a5e82eed00
Signed-off-by: TanelDettenborn <tanel.dettenborn@intel.com>