Fix bug when check for Python version