Fixed some problems detected by eslint