Is this correct? It seems to me that the if logic got inverted.