CA-139588: Try to prevent Index was out of range exception by invoking on the event thread

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Merge pull request #120 from MihaelaStoica/CA-139588

CA-139588: Try to prevent Index was out of range exception by invoking o...