Fixed main tag reading.