Fix grep pattern for beam process

The stop command does not wait for the node to completely stop because of bad grep pattern.