Fix typos and incorrect warning being shown always

Change-Id: I3aaf70480207ed6478fd5c9f811f63eb37f10504
Signed-off-by: Lorand Jakab <lojakab@cisco.com>