fixed improper placement of ser.readline()