More bug fixes on EMA method