cleanup in lookup commands.