Update check_center.py

Fixed some bugs.