Ported over fixed references from Astropy core