Fix problem which raises exception when `python manage.py kaserve` is ran.