Implemented fixes from eteq/astropy#10