fixes for parsing more than 10 queries.. sorry about that!