Addressed code-analysis errros.