Corrected errors revealed by eslint