fixed eslint errors and warnings