fix the upside-down output