Fix grep pattern for beam process