fix for various petscs