fix minor linting issues and bug