Algorithm minor change.