Implemented fixes for compatibility with latest versions of pywcs and astropy.