fix some goofed up logic.