[TASK] Again fix several issues mentioned in scrutinizer

Releases: 2.0.0
Change-Id: I5790d86ac7936ae6f18807fc8417a892defffa4a