Fixing bugs

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