Fixed nasty concurrency bug in EC