Fixed get_outbox function