Fix read_top_statements ending