Fix bug in applecore mode