fix core bug