Fix no core error when there is a core