Replaced core files with working version