Fixes some backwards logic