Update server_com.py

Added error correction, simplified nP