When did buda king casimir issue the heir to his nephew