Fix linter warning and errors