fixed bug with processing last annotations in the input