Tests fixes and static checks corrections