fixes backwards logic