Bug; had to reverse logic