fix astype