Some small fixes for static analysis findings