Moved parsing to when the connection finishes