fixed for ec 5.0+