Added catching of RejectedException.