Fixed some issues reported by the CodePro Analytics plugin.

Signed-off-by: Tushar Narayan <tusharnarayan@gmail.com>