updated for 0.4.0 rc0(cherry picked from commit f8b408f2059af780513faaea60c2e8988e36c24f)