Fix issue with linting and adding better checks