Fix variable declaration

Declare variable at start of code block.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Update changelog

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>