Update ser.py

Revert changes of ser.py