strict mode, linting and condition fixed