fix bug in server
flake8: unused imports