Small fix

The notifyAll() method needed to be surrounded by a try/catch block
because it will throw an error if there is no thread waiting to be
released from block.