Fixing calculation of options issued in documents.