Fix issues reported by Scrutinizer.

Signed-off-by: Ashutosh Dhundhara <ashutoshdhundhara@yahoo.com>