add exception handling to queues - fixes #4