fix getcorefromblock