Make the overlay work again.

The brackets in this if statement weren't quite right.