fixed bugs due to astropy removal